﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.DataVisualization.Charting;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Alimentador.BottomGroup.Results
{
    /// <summary>
    /// Interaction logic for ChartPopUp.xaml
    /// </summary>
    public partial class ChartPopUp : Window
    {
        public Chart m_mainChart { get; set; }

        public ChartPopUp()
        {
            InitializeComponent();
        }

        public ChartPopUp(Chart mainChart)
        {
            InitializeComponent();
            //if (TheMain != null)
            //{
                m_mainChart = mainChart;

                try
                {
                    TheMain.Children.Add(mainChart);
                }
                catch
                {
                    System.Console.WriteLine("12");
                }

                this.Title = (string)mainChart.Title;
            //}
        }

        internal Chart getChartBack()
        {
            TheMain.Children.Remove(m_mainChart);

            return m_mainChart;
        }
    }
}
